package com.elitel.frame.business.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.elitel.frame.business.dao.ext.ExecuteSqlMapper;
import com.elitel.frame.business.service.BaseJarServerService;
import com.elitel.frame.main.dao.BaseJarinfoMapper;
import com.elitel.frame.main.dao.BaseJarserverMapper;
import com.elitel.frame.main.dao.ext.ExtBaseJarinfoMapper;
import com.elitel.frame.main.entity.BaseJarinfo;
import com.elitel.frame.main.entity.BaseJarserver;
import com.elitel.frame.main.entity.CfgDb;

@Service
public class BaseJarServerServiceImpl implements BaseJarServerService {

	@Resource
	private ExecuteSqlMapper executeSqlMapper;
	
	@Resource
	private BaseJarserverMapper baseJarserverMapper;
	
	@Resource
	private ExtBaseJarinfoMapper extBaseJarinfoMapper;
	
	@Override
	public List<Map<String, Object>> selectSqlData(CfgDb cfgDb, String attach) {
		List<Map<String, Object>> list = executeSqlMapper.executequerySql(attach);
		return list;
	}


	@Override
	public BaseJarserver selectServer(String serviceID) {
		BaseJarserver baseJarserver = baseJarserverMapper.selectByPrimaryKey(serviceID);
		return baseJarserver;
	}


	@Override
	public BaseJarinfo selectInfo(String jarName) {
		BaseJarinfo baseJarinfo = extBaseJarinfoMapper.selectJarInfo(jarName);
		return baseJarinfo;
	}

}
